<template>
  <div>
    <!--表格渲染-->
    <el-table class="tl-table" ref="mainTable" size="small" v-loading="loading" :data="datas" @selection-change="doSelectChange" @sort-change="doSortChange" @row-dblclick="doRowDbClick" @row-click="doRowClick" row-key="id" border fit :row-class-name="doChangeRowClassName">
      <el-table-column type="index" label="序号" width="55px" align="center"></el-table-column>
      <!-- <el-table-column prop="projectid" label="立项id" width="150px" sortable="custom" sort-by="projectid" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="appointmentid" label="任命书id" width="150px" sortable="custom" sort-by="appointmentid" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column> -->
      <el-table-column prop="projectcode" label="项目编号" width="150px" sortable="custom" sort-by="projectcode" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="teamname" label="项目团队名称" width="150px" sortable="custom" sort-by="teamname" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="projectdisadvantage" label="项目不足" width="150px" sortable="custom" sort-by="projectdisadvantage" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="disadvantagereason" label="不足原因分析" width="150px" sortable="custom" sort-by="disadvantagereason" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="disadvantageadvice" label="不足建议" width="150px" sortable="custom" sort-by="disadvantageadvice" align="center" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="description" label="备注" min-width="250px" align="left" header-align="center" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column label="操作" width="100px" v-slot="scope" fixed="right">
        <el-dropdown trigger="hover">
          <el-button type="text" icon="el-icon-s-operation" style="margin-left:10px">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
          <el-dropdown-menu>
            <el-dropdown-item type="text" icon="el-icon-edit" @click.native="openEditDialog('editForm', scope.row.id)">编辑</el-dropdown-item>
            <el-dropdown-item icon="el-icon-view" @click.native="openViewDialog('editForm', scope.row.id)">查看</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-table-column>
    </el-table>
    <tl-edit ref="editForm" @refresh="doRefresh"></tl-edit>
  </div>
</template>

<script>
/** mixins */
import { mixin_list } from '@tapui/mixins/mixin_list'
import { mixin_list_base } from '/src/mixins/mixin_list_base'
/** 子组件 */
import tlEdit from './editReviewDisComp'
/** 工具类 */
import { getAction, putAction, postAction, deleteAction } from '@tapui/utils/http'
export default {
  name: 'sdProjectTeamType',
  mixins: [mixin_list, mixin_list_base],
  components: { tlEdit },
  data() {
    return {
      description: 'SD项目任命-项目组分类-列表查询',
      urlPrefix: '/sd/projectTeamType/',
      url: {
        // queryCodeList: '/sd/projectTeamType/dataCodeList'
      },
      // 排序参数
      sorterInfo: {
        sidx: 'sortcode',
        sord: 'asc'
      }
    }
  },
  props: {
    parentId: {
      type: [Number, String],
      default: ''
    }
  },
  methods: {
    beforeLoadData() {
      if (!this.parentId) {
        return false
      }
      this.queryParam.qry_review_parentid = this.parentId
      return true
    }
  }
}
</script>

<style scoped></style>

